package com.walleipt.demo.aop.customAopSimple.logger;

import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.RootBeanDefinition;
import org.springframework.context.annotation.ImportBeanDefinitionRegistrar;
import org.springframework.core.type.AnnotationMetadata;

public class BeforeLogerRegistrar implements ImportBeanDefinitionRegistrar {

	public void registerBeanDefinitions(
			AnnotationMetadata importingClassMetadata,
			BeanDefinitionRegistry registry) {
		
		// 注册autoProxyCreateor(注册代理对象)
		RootBeanDefinition beanDefinition = new RootBeanDefinition() ;
		beanDefinition.setBeanClass(BeforeLoggerAutoProxyCreator.class) ;
		registry.registerBeanDefinition("beforeLoggerAutoProxyCreator", beanDefinition) ;
	}


}
